﻿@{
    Layout = null;
    string control = ((string)ViewContext.RouteData.Values["controller"]).ToUpper();
}

<nav class="navbar">
    <div class="container">
        
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a href="@Url.Action("Index", "User")" class="navbar-brand">Pocket Guide</a>
        </div>
        @*<div id="navbar" class="collapse navbar-collapse">*@
        <div>
            <ul class="nav navbar-nav">
                @*<li @{ if (control == "HOME") { <text> class='active' </text>  }}>
                    @Html.ActionLink("Home", "Index", "Home", new { area = "" }, null)
                </li>
                <li @{ if (control == "API") { <text> class='active' </text>   }}>
                    @Html.ActionLink("API", "Index", "Help", new { area = "" }, null)
                </li>*@
                <li @{ if (control == "USER") { <text> class='active' </text>   }}>
                    <a href="@Url.Action("Index", "User")">User</a>
                </li>
                <li @{ if (control == "CHAPTER") { <text> class='active' </text>   }}>
                    <a href='@Url.Action("Index", "Chapter")'>Book</a>
                </li>
                <li @{ if (control == "VACCINE") { <text> class='active' </text>   }}>
                    <a href='@Url.Action("Index", "Vaccine")'>Vaccine</a>
                </li>
                <li @{ if (control == "Reset Password") { <text> class='active' </text>   }}>
                    <a href='@Url.Action("ResetPassword", "Account")'>Reset Password</a>
                </li>
                <li class="dropdown">
                    @if (Request.IsAuthenticated)
                    {
                        
                        <text>
                            <a  style="color:blueviolet" href="#" class="dropdown-toggle" data-toggle="dropdown">@User.Identity.Name <span class="caret"></span></a> 
                            <ul class="dropdown-menu">                                
                                <li>
                                   <a style="background-color:yellow ; color:red" href="@Url.Action("Logout", "Account")"><b>Logout</b></a>
                                </li>
                            </ul>
                        
                        </text>
                    }
                </li>
            </ul>

        </div>
    </div>
</nav>


